Single Layer Perceptron Python